﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace AUV5.Web.Pages
{
    public partial class UserSendActiveEmail : PageBaseFrontend
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (base.IsVerified)
                {
                    Model.UserInfo user = BLL.UserInfoBLL.Instance.GetDetail(base.VerifiedUserID);
                    if (user.State == (int)Common.Enum.auvState.Disable)
                    {
                        BLL.UserInfoBLL.Instance.SendActiveEmail(user);
                    }

                    base.VerifiedInfo = new Model.VerifiedInfo(user);

                    //Session["UserInfo"] = new Model.VerifiedInfo(user);

                    Response.Redirect(URL_INDEX);
                }
                else
                {
                    Response.Redirect(URL_LOGIN);
                }
            }
        }
    }
}